var jsCode = [
  '"use strict";',
  "function Person(age) {",
  "	if (age) {",
  "		this.age = age;",
  "	}",
  "}",
  "Person.prototype.getAge = function () {",
  "	return this.age;",
  "};",
].join("\n");

var editor = monaco.editor.create(document.getElementById("container"), {
  value: jsCode,
  language: "javascript",
  glyphMargin: true,
});

var decorations = editor.deltaDecorations(
  [],
  [
    {
      range: new monaco.Range(3, 1, 3, 1),
      options: {
        isWholeLine: true,
        className: "myContentClass",
        glyphMarginClassName: "myGlyphMarginClass",
      },
    },
  ]
);

// 你现在可以使用 `decorations` 改变或者移除装饰
